package com.xuelang.pipeline.infrastructure.task.converter;

import com.xuelang.pipeline.domain.task.TaskDef;
import com.xuelang.pipeline.infrastructure.task.dataobject.TaskDefDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 流水线任务定义实体与流水线任务定义DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface TaskDefToTaskDefDOConverter {

    TaskDefToTaskDefDOConverter INSTANCE = Mappers.getMapper(TaskDefToTaskDefDOConverter.class);

    /**
     * TaskDef转化为TaskDefDO
     * @param taskDef
     * @return
     */
    TaskDefDO taskDefToTaskDefDO(TaskDef taskDef);

    /**
     * TaskDefDO转化为TaskDef
     * @param taskDefDO
     * @return
     */
    TaskDef taskDefDOToTaskDef(TaskDefDO taskDefDO);

}
